package com.liusaidh.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "Blog对象：文章实体类",description = "文章实体类")
public class Blog {
    @ApiModelProperty(value = "id", name = "id")
    private Integer id;
    @ApiModelProperty(value = "被谁发布,（用户的id）", name = "createBy")
    private Integer createBy;
    @ApiModelProperty(value = "文章的内容", name = "text")
    private String text;
    @ApiModelProperty(value = "点赞数", name = "like")
    private Integer likes;
    @ApiModelProperty(value = "阅读数", name = "amount")
    private Integer amount;
    @ApiModelProperty(value = "转发数", name = "transmit")
    private Integer transmit;
    @ApiModelProperty(value = "是否被删除,0代表没删除，1代表被删除", name = "id")
    //0代表没删除，1代表被删除
    private Integer exist;
    @ApiModelProperty(value = "发布时间", name = "publishedDate")
    private String publishedDate;
    @ApiModelProperty(value = "状态,0代表未审核  1代表经过审核  2代表在用户的草稿箱")
    //0代表未审核  1代表经过审核  2代表在用户的草稿箱
    private Integer state;
    @ApiModelProperty(value = "标签", name = "label")
    private String label;
    @ApiModelProperty(value = "类别", name = "type")
    private String type;
    @ApiModelProperty(value = "图片地址", name = "pictureUrl")
    private String[] pictureUrl;
    @ApiModelProperty(value = "视频地址", name = "videoUrl")
    private String[] videoUrl;
    @ApiModelProperty(value = "是不是热搜", name = "hot")
    private Integer hot;

    public Blog(Integer createBy, String text, String label, String type, String[] pictureUrl, String[] videoUrl) {
        this.createBy = createBy;
        this.text = text;
        this.label = label;
        this.type = type;
        this.pictureUrl = pictureUrl;
        this.videoUrl = videoUrl;
    }


    public Blog(Integer amount,  Integer exist, Integer transmit,Integer likes,  Integer hot,Integer state,String publishedDate ) {
        this.likes = likes;
        this.amount = amount;
        this.transmit = transmit;
        this.exist = exist;
        this.publishedDate = publishedDate;
        this.state = state;
        this.hot = hot;
    }
}
